{{ template "layout.html" . }}
{{define "title"}}
    <title>新增用户</title>
{{end}}
{{define "main_body"}}
<div class="main_body" id="main_body">
    <div class="breadcrub">
        当前位置：用户管理>新增用户
    </div>
    <div class="pannel">
        <!-- <form  method="post" action="/register">     
            <h3 class="review_title">新增用户</h3>
            <input type="text" placeholder="用户名" class="input_txt" name="userName">
            <input type="password" placeholder="密码" class="input_txt" name = "password">
            <input type="submit" value="添加" class="input_sub">
        </form> -->

        <form method="POST"  enctype="multipart/form-data" action="/User/AddUser">
        <h3 class="review_title">新增用户</h3>
        <div class="form_group">
            <label>用户名称：</label>
            <input type="text" class="input_txt4" name="userName" >
        </div>
        <div class="form_group">
            <label>用户密码：</label>
            <input type="password" class="input_txt4" name = "password" >
            <!-- <textarea class="input_multxt" name="content"></textarea> -->
        </div>
        <div class="form_group">
            <label>所属部门：</label>
            <input type="text" class="input_txt4" name = "dep" >
            <!-- <textarea class="input_multxt" name="content"></textarea> -->
        </div>
        <div class="form_group">
            <label>邮箱地址：</label>
            <input type="text" class="input_txt4" name = "email" >
            <!-- <textarea class="input_multxt" name="content"></textarea> -->
        </div>
        {{ if eq .username "admin"}}
        <div class="form_group indent_group line_top">
            <input type="submit" value="添 加" class="confirm">
            <span>{{.errmsg}}</span>
        </div>
        {{ else }}
        <span></span>
        {{ end }}
        </form>
    </div>
</div>
{{end}}